import requests

cookies = {
    'QN1': '0000f9002f1061afd6d88cc7',
    'QN48': 'd70a03d6-0dd6-45c4-9e12-32be37ebda83',
    'F234': '1719629019080',
    'QN300': 'organic',
    'ctt_june': '1683616182042##iK3wWSPOWhPwawPwasPnasihWRGIaKj%3DWSX%3DESXNW%3Dana%3DkRVPXNEKDmaKjsiK3siK3saKgnVKjwVKvwaRD%3DWUPwaUvt',
    'Alina': '8532a1af-33bb36-7548d576-22948299-7668667f74dc',
    'quinn': '7bdbd9040e1675cb6f11aad82e3e44271213775c90163f0877891fbb00fe4892ead43c094a3d9bdba362a6c6d4cbd69a',
    'QN601': '4aaa565e99105153ffb4e3c8999e0747',
    'QN621': 'fr%3Dtouch_index_search',
    'F235': '1719629511680',
    'QN668': '51%2C57%2C51%2C59%2C56%2C54%2C52%2C55%2C54%2C54%2C57%2C53%2C59',
    'AKA_A2': 'A',
    'ctf_june': '1683616182042##iK3wVR3%3DVhPwawPwa%3DXAaKj%3DWD3%3Da2X%3Das3%3DVKThVDPwWKtsVKThXPPNaKHDiK3siK3saKgnVKj%3DaSP%3DWSjNWwPwaUvt',
    'RT': '"z=1&dm=m.flight.qunar.com&si=4ce82f5e-1a60-4cc0-92bf-11a5f4f3b667&ss=lxzqrrgg&sl=0&tt=0"',
    'cs_june': '22eef72cd875acd234069f84e073a13d3188f8dd17e83a74b4e874821f6346a6b625fe6326e3e1ac3fabf8839818415662f8024fa4617ce275d10d71e312bc1cb17c80df7eee7c02a9c1a6a5b97c1179fafb7900a04b886712e8ee5b04992b805a737ae180251ef5be23400b098dd8ca',
}
# 'pre'
headers = {
    '412898': '13c3ded079e5df62b1d28bf4b367c6e118ced4df',
    'accept': 'application/json, text/javascript',
    'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
    'content-type': 'application/json',
    # 'cookie': 'QN1=0000f9002f1061afd6d88cc7; QN48=d70a03d6-0dd6-45c4-9e12-32be37ebda83; F234=1719629019080; QN300=organic; ctt_june=1683616182042##iK3wWSPOWhPwawPwasPnasihWRGIaKj%3DWSX%3DESXNW%3Dana%3DkRVPXNEKDmaKjsiK3siK3saKgnVKjwVKvwaRD%3DWUPwaUvt; Alina=8532a1af-33bb36-7548d576-22948299-7668667f74dc; quinn=7bdbd9040e1675cb6f11aad82e3e44271213775c90163f0877891fbb00fe4892ead43c094a3d9bdba362a6c6d4cbd69a; QN601=4aaa565e99105153ffb4e3c8999e0747; QN621=fr%3Dtouch_index_search; F235=1719629511680; QN668=51%2C57%2C51%2C59%2C56%2C54%2C52%2C55%2C54%2C54%2C57%2C53%2C59; AKA_A2=A; ctf_june=1683616182042##iK3wVR3%3DVhPwawPwa%3DXAaKj%3DWD3%3Da2X%3Das3%3DVKThVDPwWKtsVKThXPPNaKHDiK3siK3saKgnVKj%3DaSP%3DWSjNWwPwaUvt; RT="z=1&dm=m.flight.qunar.com&si=4ce82f5e-1a60-4cc0-92bf-11a5f4f3b667&ss=lxzqrrgg&sl=0&tt=0"; cs_june=22eef72cd875acd234069f84e073a13d3188f8dd17e83a74b4e874821f6346a6b625fe6326e3e1ac3fabf8839818415662f8024fa4617ce275d10d71e312bc1cb17c80df7eee7c02a9c1a6a5b97c1179fafb7900a04b886712e8ee5b04992b805a737ae180251ef5be23400b098dd8ca',
    'csht': '',
    'origin': 'https://m.flight.qunar.com',
    'pre': 'adbd1739-87d747-9347fa95-51b2d759-c777f2d294ff',
    'priority': 'u=1, i',
    'referer': 'https://m.flight.qunar.com/ncs/page/flightlist?depCity=%E5%8C%97%E4%BA%AC&arrCity=%E4%B8%8A%E6%B5%B7&goDate=2024-07-02&from=touch_index_search&child=0&baby=0&cabinType=0',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-origin',
    'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',
    'wps': '21',
    'x-requested-with': 'XMLHttpRequest',
}

# 'Bella', 'r', 'st'
json_data = {
    'arrCity': '上海',
    'baby': '0',
    'cabinType': '0',
    'child': '0',
    'depCity': '北京',
    'from': 'touch_index_search',
    'goDate': '2024-07-02',
    'firstRequest': True,
    'Bella': '1683616182042##4322a11aa733e8ce41fcf8e0dab8050ae6a825d7##iKohiK3wgMkMf-i0gUPwaUPsXuPwaUPwaUPwXwPwa5TQjOWxcI10aS30a=D0aS3AVRXNiK3siK3sX=fIWRWTWK2wEKXnVP3+WwPwawPwasD+aK2OWRa8WKasWsX0aS30a2a0aSisyI0wcIkNiK3wiKWTiK3wWMDwW9a+j9P+j9jNWIEHaMDmV9P=jOXmaKPNWIkSaRv0aS30a2a0aSi=y-ELfuPwaUPsXuPwaUkGWuPmEukhXUkGWuPNawkTXukGWuPmWhkhEUkGWwkhEhPNaukGWUPNXwkhXukGWwkTWukTVhkGWUPNXwPmEhkGWuPmXukTauPwaUPwXwPwaMe0d-oxgMEsiK3wiKWTiK3wiKiRiPPAiKHGiPihiPPNiKtwiPDsiPPAiKt=iPiIiKiRiPPmiKtmiPGTiPP+iKHIiPGDiPPOiK0IiPDAiPPmiPGIiPDwiKiRiK3wiKiRiK3wfIksj+iQgCEQcOm0aS30a=D0aS30EKP0VDP0X230EKP0VKa0XPD0EKP0VRX0X2jpP-kbj-3bjOFeJukGVukTawPNEukGWUPNXwkhXukGWwkTWukTVhPwXwkGWwPmVukhVukGWhkhXUkhWwPwaUPwXwPwaMHxg+X0aS30a=D0aSieqMfLy9opohNno9NHgUNScO=0aS30a2a0aSisj+iQgCEKgMa0aS30a=D0WP30aSi+f9iwf-Wxo-iSfuNSq9W=iK3wiKiRiK3wjOFec9Fbq5GAcMGwd5pbjwPwaUPAEhP+Ehvt##mBdC1vfPTZKeOCRR11Fhv##arrCity,baby,cabinType,child,depCity,from,goDate,firstRequest',
    'startNum': 0,
    'sort': 5,
    'r': 1719643053372,
    '_v': 2,
    'underageOption': '',
    'st': 1719643053371,
    '__m__': 'ca72dbc4589bee42fc06838ff48abd63',
}

response = requests.post('https://m.flight.qunar.com/flight/api/touchInnerList', cookies=cookies, headers=headers, json=json_data).json()
print(response)

# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
#data = '{"arrCity":"上海","baby":"0","cabinType":"0","child":"0","depCity":"北京","from":"touch_index_search","goDate":"2024-07-02","firstRequest":true,"Bella":"1683616182042##f327cf196270cf34b75cb2623f3373a01ba35d7d##iKohiK3wgMkMf-i0gUPwaUPsXuPwaUPwaUPwXwPwa5TQjOWxcI10aS30a=D0aS3wWs2siK3siK3sW=jwXKawX23Oas2+ERihEUPwawPwasD+aK2OWR3+aS2AaRv0aS30a2a0aSisyI0wcIkNiK3wiKWTiK3wWMDwW9a+j9P+j9jNWIEHaMDmV9P=jOXmaKPNWIkSaRv0aS30a2a0aSi=y-ELfuPwaUPsXuPwaUkGWuPmEukhXUkGWuPNawkTXukGWuPmWhkhEUkGWwkhEhPNaukGWUPNXwkhXukGWwkTWukTVhkGWUPNXwPmEhkGWuPmXukTauPwaUPwXwPwaMe0d-oxgMEsiK3wiKWTiK3wiKiRiPPAiKHGiPihiPPNiKtwiPDsiPPAiKt=iPiIiKiRiPPmiKtmiPGTiPP+iKHIiPGDiPPOiK0IiPDAiPPmiPGIiPDwiKiRiK3wiKiRiK3wfIksj+iQgCEQcOm0aS30a=D0aS30EKP0VDP0X230EKP0VKa0XPD0EKP0VRX0X2jpP-kbj-3bjOFeJukGVukTawPNEukGWUPNXwkhXukGWwkTWukTVhPwXwkGWwPmVukhVukGWhkhXUkhWwPwaUPwXwPwaMHxg+X0aS30a=D0aSieqMfLy9opohNno9NHgUNScO=0aS30a2a0aSisj+iQgCEKgMa0aS30a=D0WP30aSi+f9iwf-Wxo-iSfuNSq9W=iK3wiKiRiK3wjOFec9Fbq5GAcMGwd5pbjwPwaUPAEhP+Ehvt##LIG00U7OcR5Gd86m-I0Hm##arrCity,baby,cabinType,child,depCity,from,goDate,firstRequest","startNum":0,"sort":5,"r":1719642729498,"_v":2,"underageOption":"","st":1719642729496,"__m__":"ca72dbc4589bee42fc06838ff48abd63"}'.encode()
#response = requests.post('https://m.flight.qunar.com/flight/api/touchInnerList', cookies=cookies, headers=headers, data=data)



